package com.baozhun.mall.common.model.bean

import java.io.Serializable

/**
 * @Title：购物车信息model
 * @Description：
 * @Author：xing.luo
 * @Since：2022/11/20
 * @Version：1.0.0
 */
class CartInfoBean(
    var total_amount: String = "",
    var points_rest: String = "0.00", //剩余余额
    var points_deduction_amount: String = "", //余额抵扣金额
    var frozen_points_desc: String = "", //余额冻结提示
    var contract_period: String = "", //合约期
    var contract_amount: String = "", //承诺月消费
    var contract_info: String = "", //合约期提示
    var pay_amount: String = "", //支付金额
    var points: String = "", //交易获得余额
    var pay_required: Boolean = true, //是否需要支付现金
    var credit_auth: Boolean = true, //是否已经信用授权
    var overdue: Boolean = true, //是否逾期
    var goods: GoodsInfoBean? = null,
) : Serializable {
    /**
     * 余额抵扣金额不为空
     */
    fun pointsDeductionAmountNotEmpty(): Boolean {
        return points_deduction_amount != null && points_deduction_amount != "0" && points_deduction_amount != ""
    }

    /**
     * 余额剩余不为空
     */
    fun pointsAmountNotEmpty(): Boolean {
        return points_rest != null && points_rest != "" && points_rest != "0" && points_rest != "0.00" && points_rest != "0.0"
    }
}